<HTML>
<HEAD>
<TITLE>JavaScript Source Code 3000:  Misc.:  Search Engine</TITLE>
<META HTTP-EQUIV="JavaScript Source Code 3000" CONTENT = "no-cache">
<META NAME="date" CONTENT="2000-09-09">
<META NAME="channel" CONTENT="Web Developer">
<META NAME="author" CONTENT="JavaScript Source Code 3000">
<META NAME="section" CONTENT="Miscellaneous">
<META NAME="description" CONTENT="This is undoubtedly the most comprehensive JavaScript search engine I have ever seen.  You just put in your search term(s), select a few options, and then you have pages of search results!  This script truly should be in a class of its own.">

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
Yahoo = "http://search.yahoo.com/bin/search?p=";
Alta = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&q=";
Direct = "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?alias=websrch&qry=";
Lycos = "http://www.lycos.com/cgi-bin/pursuit?query=";
Crawler = "http://www.webcrawler.com/cgi-bin/WebQuery?searchText=";
GoCom = "http://www.go.com/Titles?col=WW&svx=home_searchbox&sv=IS&lk=noframes&qt=";
DejaNews = "http://www.deja.com/products/search/search.xp?PVW=&QRY=";
Google = "http://www.google.com/search?q=";
Go2Net = "http://search.metacrawler.com/crawler?method=0&searchType=web&format=portal&cat=web&redirect=&target=&power=1&opendir_p1=&p_region=&query=&general=";
SearchCom = "http://www.search.com/search?channel=1&tag=st.se.fd..sch&submit=Search&q=";
Mamma = "http://www.mamma.com/Mamma?p1=1&timeout=4&qtype=0&query=";
DogPile = "http://search.dogpile.com/texis/search?geo=no&fs=web&av=custom&engines=goto&engines=looksmart&engines=thunderstone&engines=findwhat&engines=sprinks&engines=directhit&engines=google&engines=infoseek&engines=lycos&engines=kanoodle&engines=opendir&engines=realnames&engines=altavista&engines=yahoo&q=";
Excite = "http://www.excite.com/search.gw?searchType=Concept&search=";
DMOZ = "http://search.dmoz.org/cgi-bin/search?search=";
Snap = "http://www.nbci.com/search/directory/results/1,61,-0,00.html?tag=st.sn.fd.srch.bar&keyword=";
Galaxy = "http://www.einet.net/cgi-bin/wais-text-multi?keywords=";
var got=0;
var url = "";
var plus="";
var mag="";
function search4(item){
stringPlus();
resultsWindow=window.open();
resultsWindow.document.open();
resultsWindow.document.write("<head><title>Close this window "
+ "to return to Search Page</title></head>"
+ "<FRAMESET ROWS=50%,50%><FRAMESET COLS=50%,50%>"
+ "<FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'>"
+ "<FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'>"
+ "</FRAMESET><FRAMESET COLS=50%,50%><FRAME NAME='frame2' "
+ "SRC='" + computeFrameSrc(2) + "'><FRAME NAME='frame3' "
+ "SRC='" + computeFrameSrc(3) + "'></FRAMESET></FRAMESET>");
resultsWindow.document.close();
got = 0;
}
function search2(item){
stringPlus();
resultsWindow=window.open();
resultsWindow.document.open();
resultsWindow.document.write("<head><title>Close this window "
+ "to return to Total search</title></head><FRAMESET ROWS=50%,50%>"
+ "<FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'><FRAME "
+ "NAME='frame1' SRC='" + computeFrameSrc(1) + "'></FRAMESET>");
resultsWindow.document.close();
got = 0;
}
function stringPlus() {
for (var j=0; j < window.document.choose4.text.value.length; j++) {
if (window.document.choose4.text.value.charAt(j) == " ")
mag += "+";
else mag += window.document.choose4.text.value.charAt(j);}
}
function numChecked(item) {
plus = escape(item.text.value);
var h=0;
num=0;
for (var l=0; l < item.check1.length; l++) {
if (item.check1[l].checked) {
h++;
if (h++ <= 4){
if (l == "0"){
num = 1;}
else if (l == "1") num = 2;
else if (l == "2") num = 3;
else if (l == "3") num = 4;
else if (l == "4") num = 5;
else if (l == "5") num = 6;
else if (l == "6") num = 7;
else if (l == "7") num = 8;
else if (l == "8") num = 9;
else if (l == "9") num = 10;
else if (l == "10") num = 11;
else if (l == "11") num = 12;
else if (l == "12") num = 13;
else if (l == "13") num = 14;
else if (l == "14") num = 15;
      }
   }
}
if (h == 2)
Results(num-1);
else if (h == 4)
search2(item);
else
search4(item);
}
function computeFrameSrc(num) {
var k=-1;
for (var j=got; j < document.choose4.check1.length; j++) {
if (document.choose4.check1[j].checked){
k++;
if (k++ <= num){
if (j == "0"){
url = Yahoo + plus;
got = 1;}
else if (j == "1"){
url = DMOZ + plus;
got = 2;}
else if (j == "2"){
url = Snap + plus;
got = 3;}
else if (j == "3"){
url = Alta + plus + "&mode=and";
got = 4;}
else if (j == "4"){
url = Direct + plus;
got = 5;}
else if (j == "5"){
url = Lycos + plus + "&backlink=217&maxhits=25";
got = 6;}
else if (j == "6"){
url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
got = 7;}
else if (j == "7"){
url = Crawler + plus + "&maxHits=25";
got = 8;}
else if (j == "8"){
url = GoCom + plus;
got = 9;}
else if (j == "9"){
url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
got = 10;}
else if (j == "10"){
url = Google + plus;
got = 11;}
else if (j == "11"){
url = Go2Net + plus;
got = 12;}
else if (j == "12"){
url = SearchCom + plus;
got = 13;}
else if (j == "13"){
url = Mamma + plus;
got = 14;}
else if (j == "14"){
url = DogPile + plus;
got = 15;}
return url;
      }
   }
}
url = "javascript:void(0)";
return url;
}
function Results(place){
stringPlus();
resultsWin = window.open("","results");
if (place == "0")
url = Yahoo + plus;
else if (place == "1")
url = DMOZ + plus;
else if (place == "2")
url = Snap + plus;
else if (place == "3")
url = Alta + plus + "&mode=and";
else if (place == "4")
url = Direct + plus + "&mode=and";
else if (place == "5")
url = Lycos + plus + "&backlink=217&maxhits=25";
else if (place == "6")
url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
else if (place == "7")
url = Crawler + plus + "&maxHits=25";
else if (place == "8")
url = GoCom + plus;
else if (place == "9")
url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
else if (place == "10")
url = Google + plus + "&hits=25&disp=Text+Only";
else if (place == "11")
url = Go2Net + plus;
else if (place == "12")
url = SearchCom + plus;
else if (place == "13")
url = Mamma + plus;
else if (place == "14")
url = DogPile + plus;
resultsWin.location = url;
}
// End  -->
</script>

</HEAD>

<BODY BGCOLOR=#ffffff vlink=#0000ff>

<BR>
<center>
<table width="600" cellpadding="0" cellspacing="10">
<tr>
<td width="468" align="center">

	
</td>
<td width="120" align="center">

	
</td>
</tr>
</table>
<BR>
<BR>
<BASEFONT SIZE=3>
  <FONT SIZE=6>
<B><FONT SIZE="+2" FACE="Helvetica,Arial" ALIGN=RIGHT COLOR="#0000FF">
<b><A HREF="../index.htm" /" TARGET="_top">
Home</A> </b><img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <b><A HREF="index.htm" /miscellaneous/"><font color="#FF0000">Miscellaneous</font></A> </b>
<img src="../img/arrow.gif" /img/arrow.gif" height=13 width=7 border=0 alt="}"> <FONT COLOR="#006666">Search Engine</FONT></b></FONT><BR>
</B><BR>
  </FONT>
<TABLE BORDER=0 WIDTH=500 CELLPADDING=3 CELLSPACING=0>
<tr><td><font FACE=" helvetica,arial,geneva">
<br>
<br>
<!-- Description --><!--content_start-->

This is undoubtedly the most comprehensive JavaScript search engine I have ever seen.  You just put in your search term(s), select a few options, and then you have pages of search results!  This script truly should be in a class of its own.<br><hr>
</td></tr>
</table>
<!--  Demonstration -->
<BODY>
<center><b>JavaScript Search</b><p>
This script will run the same search across <br>
4 of the major search engines at one time.
<form name="choose4" action="javascript:numChecked(document.choose4) //"><p>
<table><tr><td><b>Directories</b><br>
<input type="checkbox" name="check1" value="Yahoo"
onClick="choose4.check1.value='Yahoo'">Yahoo<br>
<input type="checkbox" name="check1" value="DMOZ"
onClick="choose4.check1.value='DMOZ'">DMOZ<br>
<input type="checkbox" name="check1" value="Snap"
onClick="choose4.check1.value='Snap'">Snap<br><br></td>
<td width="15"></td>
<td><b>Search Engines</b><br>
<input type="checkbox" name="check1" value="Alta"
onClick="choose4.check1.value='Alta'">Alta Vista<br>
<input type="checkbox" name="check1" value="Direct"
onClick="choose4.check1.value='Direct'">Direct Hit<br> 
<input type="checkbox" name="check1" value="Lycos"
onClick="choose4.check1.value='Lycos'">Lycos<br>
<input type="checkbox" name="check1" value="Excite"
onClick="choose4.check1.value='Excite'">Excite<br></td>
<td><br><input type="checkbox" name="check1" value="Crawler"
onClick="choose4.check1.value='Crawler'">Webcrawler<br>
<input type="checkbox" name="check1" value="Go.com"
onClick="choose4.check1.value='Go.com'">Go.com<br>
<input type="checkbox" name="check1" value="DejaNews"
onClick="choose4.check1.value='DejaNews'">DejaNews<br>
<input type="checkbox" name="check1" value="Google"
onClick="choose4.check1.value='Google'">Google<br> </td>
<td width="15"></td>
<td><b>Meta Searches</b><br>
<input type="checkbox" name="check1" value="Go2Net"
onClick="choose4.check1.value='Go2Net'">Go2Net<br>
<input type="checkbox" name="check1" value="SearchCom"
onClick="choose4.check1.value='SearchCom'">Search.Com<BR>
<input type="checkbox" name="check1" value="Mamma"
onClick="choose4.check1.value='Mamma'">Mamma<br>
<input type="checkbox" name="check1" value="DogPile"
onClick="choose4.check1.value='DogPile'">DogPile<br>
</td></tr></table><P>
<B>Enter text to find</B>:<BR>
<input type="text" name="text" size=30>
<input type="submit" name="send" value="Search">
</form>
</center>
<P>
<BR>
<P>
<a name="source">
<TABLE BORDER=0 WIDTH=500 CELLPADDING=3 CELLSPACING=0>
<tr><td BGCOLOR=yellow><font FACE="helvetica,arial,geneva"><b>JavaScript Source Code 3000:  Misc.:  Search Engine</b>
<p>Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as NotePad or SimpleText) and save (Control-s or Apple-s).  The script is yours!<br><br></font></td></tr>
<tr><td BGCOLOR=yellow ALIGN=CENTER>
<form NAME="copy">

<DIV align="center">
<input type=button value="Highlight All" onClick="javascript:this.form.txt.focus();this.form.txt.select();">&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE="text" NAME="total" VALUE="Script Size:  7.65 KB  " size="24">
</DIV>

<textarea NAME="txt" ROWS=20 COLS=75 WRAP=VIRTUAL>

&lt;!-- TWO STEPS TO INSTALL SEARCH ENGINE:

   1.  Paste the coding into the HEAD of your HTML document
   2.  Put the last coding into the BODY of your HTML document  --&gt;

&lt;!-- STEP ONE: Copy this code into the HEAD of your HTML document  --&gt;

&lt;HEAD&gt;

&lt;SCRIPT LANGUAGE="JavaScript"&gt;

&lt;! &gt;
&lt;! &gt;

&lt;!-- Begin
Yahoo = "http://search.yahoo.com/bin/search?p=";
Alta = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&q=";
Direct = "http://www.directhit.com/fcgi-bin/DirectHitWeb.fcg?alias=websrch&qry=";
Lycos = "http://www.lycos.com/cgi-bin/pursuit?query=";
Crawler = "http://www.webcrawler.com/cgi-bin/WebQuery?searchText=";
GoCom = "http://www.go.com/Titles?col=WW&svx=home_searchbox&sv=IS&lk=noframes&qt=";
DejaNews = "http://www.deja.com/products/search/search.xp?PVW=&QRY=";
Google = "http://www.google.com/search?q=";
Go2Net = "http://search.metacrawler.com/crawler?method=0&searchType=web&format=portal&cat=web&redirect=&target=&power=1&opendir_p1=&p_region=&query=&general=";
SearchCom = "http://www.search.com/search?channel=1&tag=st.se.fd..sch&submit=Search&q=";
Mamma = "http://www.mamma.com/Mamma?p1=1&timeout=4&qtype=0&query=";
DogPile = "http://search.dogpile.com/texis/search?geo=no&fs=web&av=custom&engines=goto&engines=looksmart&engines=thunderstone&engines=findwhat&engines=sprinks&engines=directhit&engines=google&engines=infoseek&engines=lycos&engines=kanoodle&engines=opendir&engines=realnames&engines=altavista&engines=yahoo&q=";
Excite = "http://www.excite.com/search.gw?searchType=Concept&search=";
DMOZ = "http://search.dmoz.org/cgi-bin/search?search=";
Snap = "http://www.nbci.com/search/directory/results/1,61,-0,00.html?tag=st.sn.fd.srch.bar&keyword=";
Galaxy = "http://www.einet.net/cgi-bin/wais-text-multi?keywords=";
var got=0;
var url = "";
var plus="";
var mag="";
function search4(item){
stringPlus();
resultsWindow=window.open();
resultsWindow.document.open();
resultsWindow.document.write("&lt;head&gt;&lt;title&gt;Close this window "
+ "to return to Search Page&lt;/title&gt;&lt;/head&gt;"
+ "&lt;FRAMESET ROWS=50%,50%&gt;&lt;FRAMESET COLS=50%,50%&gt;"
+ "&lt;FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'&gt;"
+ "&lt;FRAME NAME='frame1' SRC='" + computeFrameSrc(1) + "'&gt;"
+ "&lt;/FRAMESET&gt;&lt;FRAMESET COLS=50%,50%&gt;&lt;FRAME NAME='frame2' "
+ "SRC='" + computeFrameSrc(2) + "'&gt;&lt;FRAME NAME='frame3' "
+ "SRC='" + computeFrameSrc(3) + "'&gt;&lt;/FRAMESET&gt;&lt;/FRAMESET&gt;");
resultsWindow.document.close();
got = 0;
}
function search2(item){
stringPlus();
resultsWindow=window.open();
resultsWindow.document.open();
resultsWindow.document.write("&lt;head&gt;&lt;title&gt;Close this window "
+ "to return to Total search&lt;/title&gt;&lt;/head&gt;&lt;FRAMESET ROWS=50%,50%&gt;"
+ "&lt;FRAME NAME='frame0' SRC='" + computeFrameSrc(0) + "'&gt;&lt;FRAME "
+ "NAME='frame1' SRC='" + computeFrameSrc(1) + "'&gt;&lt;/FRAMESET&gt;");
resultsWindow.document.close();
got = 0;
}
function stringPlus() {
for (var j=0; j &lt; window.document.choose4.text.value.length; j++) {
if (window.document.choose4.text.value.charAt(j) == " ")
mag += "+";
else mag += window.document.choose4.text.value.charAt(j);}
}
function numChecked(item) {
plus = escape(item.text.value);
var h=0;
num=0;
for (var l=0; l &lt; item.check1.length; l++) {
if (item.check1[l].checked) {
h++;
if (h++ &lt;= 4){
if (l == "0"){
num = 1;}
else if (l == "1") num = 2;
else if (l == "2") num = 3;
else if (l == "3") num = 4;
else if (l == "4") num = 5;
else if (l == "5") num = 6;
else if (l == "6") num = 7;
else if (l == "7") num = 8;
else if (l == "8") num = 9;
else if (l == "9") num = 10;
else if (l == "10") num = 11;
else if (l == "11") num = 12;
else if (l == "12") num = 13;
else if (l == "13") num = 14;
else if (l == "14") num = 15;
      }
   }
}
if (h == 2)
Results(num-1);
else if (h == 4)
search2(item);
else
search4(item);
}
function computeFrameSrc(num) {
var k=-1;
for (var j=got; j &lt; document.choose4.check1.length; j++) {
if (document.choose4.check1[j].checked){
k++;
if (k++ &lt;= num){
if (j == "0"){
url = Yahoo + plus;
got = 1;}
else if (j == "1"){
url = DMOZ + plus;
got = 2;}
else if (j == "2"){
url = Snap + plus;
got = 3;}
else if (j == "3"){
url = Alta + plus + "&mode=and";
got = 4;}
else if (j == "4"){
url = Direct + plus;
got = 5;}
else if (j == "5"){
url = Lycos + plus + "&backlink=217&maxhits=25";
got = 6;}
else if (j == "6"){
url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
got = 7;}
else if (j == "7"){
url = Crawler + plus + "&maxHits=25";
got = 8;}
else if (j == "8"){
url = GoCom + plus;
got = 9;}
else if (j == "9"){
url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
got = 10;}
else if (j == "10"){
url = Google + plus;
got = 11;}
else if (j == "11"){
url = Go2Net + plus;
got = 12;}
else if (j == "12"){
url = SearchCom + plus;
got = 13;}
else if (j == "13"){
url = Mamma + plus;
got = 14;}
else if (j == "14"){
url = DogPile + plus;
got = 15;}
return url;
      }
   }
}
url = "javascript:void(0)";
return url;
}
function Results(place){
stringPlus();
resultsWin = window.open("","results");
if (place == "0")
url = Yahoo + plus;
else if (place == "1")
url = DMOZ + plus;
else if (place == "2")
url = Snap + plus;
else if (place == "3")
url = Alta + plus + "&mode=and";
else if (place == "4")
url = Direct + plus + "&mode=and";
else if (place == "5")
url = Lycos + plus + "&backlink=217&maxhits=25";
else if (place == "6")
url = Excite + plus + "&category=default&mode=relevance&showqbe=1&display=html3,hb";
else if (place == "7")
url = Crawler + plus + "&maxHits=25";
else if (place == "8")
url = GoCom + plus;
else if (place == "9")
url = DejaNews + plus + "&defaultOp=AND&svcclass=dncurrent&maxhits=25";
else if (place == "10")
url = Google + plus + "&hits=25&disp=Text+Only";
else if (place == "11")
url = Go2Net + plus;
else if (place == "12")
url = SearchCom + plus;
else if (place == "13")
url = Mamma + plus;
else if (place == "14")
url = DogPile + plus;
resultsWin.location = url;
}
// End  --&gt;
&lt;/script&gt;

&lt;!-- STEP TWO: Copy this code into the BODY of your HTML document  --&gt;

&lt;BODY&gt;

&lt;center&gt;&lt;b&gt;JavaScript Search&lt;/b&gt;&lt;p&gt;
This script will run the same search across &lt;br&gt;
4 of the major search engines at one time.
&lt;form name="choose4" action="javascript:numChecked(document.choose4) //"&gt;&lt;p&gt;
&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Directories&lt;/b&gt;&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Yahoo"
onClick="choose4.check1.value='Yahoo'"&gt;Yahoo&lt;br&gt;
&lt;input type="checkbox" name="check1" value="DMOZ"
onClick="choose4.check1.value='DMOZ'"&gt;DMOZ&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Snap"
onClick="choose4.check1.value='Snap'"&gt;Snap&lt;br&gt;&lt;br&gt;&lt;/td&gt;
&lt;td width="15"&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Search Engines&lt;/b&gt;&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Alta"
onClick="choose4.check1.value='Alta'"&gt;Alta Vista&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Direct"
onClick="choose4.check1.value='Direct'"&gt;Direct Hit&lt;br&gt; 
&lt;input type="checkbox" name="check1" value="Lycos"
onClick="choose4.check1.value='Lycos'"&gt;Lycos&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Excite"
onClick="choose4.check1.value='Excite'"&gt;Excite&lt;br&gt;&lt;/td&gt;
&lt;td&gt;&lt;br&gt;&lt;input type="checkbox" name="check1" value="Crawler"
onClick="choose4.check1.value='Crawler'"&gt;Webcrawler&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Go.com"
onClick="choose4.check1.value='Go.com'"&gt;Go.com&lt;br&gt;
&lt;input type="checkbox" name="check1" value="DejaNews"
onClick="choose4.check1.value='DejaNews'"&gt;DejaNews&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Google"
onClick="choose4.check1.value='Google'"&gt;Google&lt;br&gt; &lt;/td&gt;
&lt;td width="15"&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Meta Searches&lt;/b&gt;&lt;br&gt;
&lt;input type="checkbox" name="check1" value="Go2Net"
onClick="choose4.check1.value='Go2Net'"&gt;Go2Net&lt;br&gt;
&lt;input type="checkbox" name="check1" value="SearchCom"
onClick="choose4.check1.value='SearchCom'"&gt;Search.Com&lt;BR&gt;
&lt;input type="checkbox" name="check1" value="Mamma"
onClick="choose4.check1.value='Mamma'"&gt;Mamma&lt;br&gt;
&lt;input type="checkbox" name="check1" value="DogPile"
onClick="choose4.check1.value='DogPile'"&gt;DogPile&lt;br&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;P&gt;
&lt;B&gt;Enter text to find&lt;/B&gt;:&lt;BR&gt;
&lt;input type="text" name="text" size=30&gt;
&lt;input type="submit" name="send" value="Search"&gt;
&lt;/form&gt;
&lt;/center&gt;

 

&lt;!-- Script Size:  7.65 KB  --&gt;</textarea><br><font FACE="helvetica,arial,geneva"></font></td></tr>

</table>
</form>
</FONT>
</CENTER>


</center>
</body></html>